package user;

import java.io.IOException;

public class SystemMenu {
    static public void showMenu(){
        System.out.println("MVC架构收银管理系统");
        System.out.println("----------------------");
        System.out.println("1.浏览商品");
        System.out.println("2.下单");
        System.out.println("3.支付");
        System.out.println("4.退款");
        System.out.println("5.管理员系统");
        System.out.println("6.退出");
        System.out.println("----------------------");
        System.out.print("请选择：");
    }
    public static void clearScreen() {
        try {
            String os = System.getProperty("os.name");
            if (os.contains("Windows")) {
                new ProcessBuilder("cmd", "/c",
                        "cls").inheritIO().start().waitFor();
            } else {
                Runtime.getRuntime().exec("clear");
            }
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}
